package com.example.demo.mq.producer;


import com.example.demo.mq.bo.ScoreMqBo;
import com.example.demo.mq.config.MqConstant;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.stereotype.Component;

@Component
@Slf4j
@AllArgsConstructor
public class ScoreMonitorProducer {

    private RabbitTemplate rabbitTemplate;

    public void sendPayScoreChangeNotification(ScoreMqBo scoreMqBo) {
        rabbitTemplate.convertAndSend(MqConstant.SCORE_EXCHANGE, MqConstant.SCORE_ROUTE_KEY, scoreMqBo);
    }
}
